﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.Entity
{
    /// <summary>
    /// 堆垛机状态实体
    /// </summary>
    public class StackerState : DevPlcStationState
    {
        /// <summary>
        /// 堆垛机工作模/堆垛机状态
        /// </summary>
        public int WorkingMode { get; set; }

        /// <summary>
        /// 堆垛机任务反馈
        /// </summary>
        public int TaskFeedback { get; set; }

        /// <summary>
        /// 托盘堆垛机库口、可出入信号
        /// 0：可出信号不可入  1：可入信号不可出  OutInWarehouse
        /// </summary>
        public int OutInWarehouse { get; set; }
    }

    /// <summary>
    /// 堆垛机工作模式/堆垛机状态
    /// </summary>
    public enum WorkingMode
    {
        离线 = 0,
        在线 = 1,
        运行中 = 2,
        故障 = 3,
    }

    /// <summary>
    /// 堆垛机工作报告
    /// </summary>
    public enum StackerTaskFeedback
    {
        取货完成 = 1,
        放货完成 = 2,
    }

    /// <summary>
    /// 堆垛机作业状态枚举
    /// </summary>
    public enum StrategyType
    {
        一出一入 = 1,
        连续出入 = 2,
    }

    /// <summary>
    /// 堆垛机作业状态枚举
    /// </summary>
    public enum RearForkStatus
    {
        待机 = 0,
        空闲在线 = 1,
        取货完成 = 2,
        放货中 = 3,
        请求卸货申请卸货 = 4,
        放货完成 = 5,
        取货准备 = 6,
        召回 = 7,
        急停 = 8,
        不明 = 9,
    }

    /// <summary>
    /// 堆垛机错误枚举
    /// </summary>
    public enum RearForkError
    {
        无故障 = 0,
        急停报警 = 1,
        重入库报警 = 2,
        货叉左极限报警 = 3,
        货叉右极限报警 = 4,
        水平变频器故障 = 5,
        垂直变频器故障 = 6,
        缺相保护 = 7,
        前后极限报警 = 8,
        上下极限报警 = 9,
        空入空出报警 = 10,
        上超差报警 = 11,
        松绳保护报警 = 12,
        左超差报警 = 13,
        右超差报警 = 14,
        水平测距后退极限报警 = 15,
        水平测距前进极限报警 = 16,
        垂直激光上极限报警 = 17,
        垂直激光下极限报警 = 18,
        水平激光障碍物报警 = 19,
        垂直激光障碍物报警 = 20,
        光通讯障碍报警 = 21,
        水平动作货叉不在中位 = 22,
        无1 = 23,
        货叉变频器报警 = 24,
        无2 = 25,
        载货取货障碍 = 26,
        无3 = 27,
        深货位取货障碍 = 28,
        空入库 = 29,
        无4 = 30,
        无5 = 31,
        货叉编码器故障 = 32,
        货叉放货未到位 = 33,
        无6 = 34,
        无7 = 35,
        货叉未在中位 = 36,
        货叉超极限 = 37,
        无8 = 38,
        货叉取货未到位 = 39,
        取货前超差 = 40,
        取货后超差 = 41,
        载货台过载保护 = 42,
        载货台松绳保护 = 43,
        无9 = 44,
        左二深极限报警 = 45,
        右二深极限报警 = 46,
        库前安全门打开 = 47,
        库尾安全门打开 = 48,
        机载柜安继断开 = 49,
        地面柜安继断开 = 50,
        货叉提升_下降超限报警 = 51,
        输送超高超宽报警 = 52,
    }
}
